<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('图片预览')"/>
    <th:block th:include="include :: viewer-js"/>
</head>
<style>
    .gray-bg {
        /*background-image: linear-gradient(to right,#359FD4,#36B5C8,#25D8AB);*/
        background: white !important;
    }

    ul, li {
        padding: 0;
        margin: 0;
        list-style: none
    }

    div, img, p, span {
        /*border-radius: 15px !important;*/
    }

    .container-div {
        overflow: auto;
        text-align: center;
        /*width: 78%;*/
    }

    ul {
        margin-top: 40px;
        overflow: auto;
    }

    img {
        width: 300px;
        height: 200px;
    }

    ul li {
        list-style-type: none;
        float: left;
        margin: 5px;
    }

    ::-webkit-scrollbar {
        display: none;
    }


    /*设备屏幕宽度小于等于400px时应l用css样式*/
    @media screen and (max-width: 400px) {
        .container-div {
            padding: 0px !important;
        }

        ul {
            margin-top: 40px;
            overflow: auto;
        }

        img {
            width: 100%;
            height: 100%;
        }

        ul li {
            margin: 2px !important;
        }

    }

    /*浏览器宽度大于等于401px且小于等于960px时使用样式*/
    @media screen and (min-width: 401px) and (max-width: 960px) {

    }

    /*设备屏幕宽度大于961px时应用css样式*/
    @media screen and (min-width: 961px) {

    }
</style>
<body class="gray-bg">
<div class="container-div">
    <div>
        <label>文件类型：</label>
        <select class="form-control" id="poegryType" name="poegryType">
            <option value="" selected>--请选择文件类型--</option>
            <option value="1">图片</option>
            <option value="2">视频</option>
            <option value="3">loading...</option>
        </select>
    </div>
    <div>
        <ul id="container">
            <li th:each="item : ${pathList}">
                <img th:src="${item.img}" th:ytsrc="${item.img}" th:alt="${item.imgId}">
                <p class="cp" style="text-align: left;"><span>评论...[[${{item.imgId}}]]</span>
                    <span style="text-align: right;float: right">
                        <a th:href="@{/system/imgDetail/findImgDetailById/{id}(id=${item.imgId})}">下载</a>
                    </span>
                </p>

            </li>

            </li>
        </ul>
    </div>


</div>
<script th:inline="javascript">
    const viewer = new Viewer(document.getElementById('container'), {});
</script>

</body>
</html>